
#ifndef CONF_H
#define CONF_H
#include <arpa/inet.h>
#include "array.h"

#if USE_INI
#include "ini_api.h"
#else
#include "lua_api.h"
#endif

typedef struct {
	struct {
		char *debug;
		char *error;
		char *access;
		char *conf;
	}log;
	struct {
		int debug_mode; /* 0 */
		int debug_level;   /* 1 */
		int maxfds;
		int daemon;
	}server;
	struct {
		char *user;
		char *password;
		char *display_name;
	}msn;
	struct {
		int secure_protocol:2;
		/* don't validate the server's certificate */
		int no_check_certificate:2;   
		/* client certificate type, PEM or DER */
		int certificate_type:2;
		/* private key type, PEM or DER. */
		int private_key_type:2;   
		/* client certificate file */
		char *cert_file;
		char *private_key;  /* private key file. */
		char *ca_cert;    /*  file with the bundle of CA's */
		char *ca_directory;  /* directory where hash list of CA's is stored. */
		char *random_file;     /*  file with random data for seeding the SSL PRNG. */
		char *egd_file;        /* file naming the EGD socket with random data. */
	}ssl;
}config_t;

extern void conf_reload(void);
extern void conf_default(void);
extern void conf_parse(void);
#endif
